package com.dundun.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName resume
 */
@TableName(value ="resume")
@Data
public class Resume implements Serializable {
    /**
     * 简历id
     */
    @TableId(type = IdType.AUTO)
    private Long resumeId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 上传时间
     */
    private Date uploadTime;

    /**
     * 简历名称
     */
    private String resumeName;

    /**
     * 简历格式
     */
    private String resumeFormat;

    /**
     * 简历文件路径
     */
    private String resumeUrl;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Resume other = (Resume) that;
        return (this.getResumeId() == null ? other.getResumeId() == null : this.getResumeId().equals(other.getResumeId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUploadTime() == null ? other.getUploadTime() == null : this.getUploadTime().equals(other.getUploadTime()))
            && (this.getResumeName() == null ? other.getResumeName() == null : this.getResumeName().equals(other.getResumeName()))
            && (this.getResumeFormat() == null ? other.getResumeFormat() == null : this.getResumeFormat().equals(other.getResumeFormat()))
            && (this.getResumeUrl() == null ? other.getResumeUrl() == null : this.getResumeUrl().equals(other.getResumeUrl()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getResumeId() == null) ? 0 : getResumeId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUploadTime() == null) ? 0 : getUploadTime().hashCode());
        result = prime * result + ((getResumeName() == null) ? 0 : getResumeName().hashCode());
        result = prime * result + ((getResumeFormat() == null) ? 0 : getResumeFormat().hashCode());
        result = prime * result + ((getResumeUrl() == null) ? 0 : getResumeUrl().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", resumeId=").append(resumeId);
        sb.append(", userId=").append(userId);
        sb.append(", uploadTime=").append(uploadTime);
        sb.append(", resumeName=").append(resumeName);
        sb.append(", resumeFormat=").append(resumeFormat);
        sb.append(", resumeUrl=").append(resumeUrl);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}